home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Grab Bag
/
Shareware Grab Bag.iso
/
017
/
direct3.bat
< prev
next >
Wrap
DOS Batch File
|
1985-01-27
|
4KB
|
199 lines
ECHO OFF
REM -- EBL Batch file for directory control
REM -- Requires ATTREDI.COM, FDATE.COM, RENDIR.COM, VOLABEL.COM
REM -- Also requires ANSI.SYS, BAT.COM, DDEL.COM, L5.COM, SD.COM, TREE.COM,
REM WAIT.COM, WHEREIS.COM
BAT %%A = %%1
BAT %C = %V
BAT IF %A <> %S SKIP 7
BAT -DRIVE
ECHO
BAT INKEY Directory for which drive? %%A
BAT IF %A = KEY01B GOTO -EXIT
BAT TYPE %A
BAT IF %A = X GOTO -EXIT
BAT %1 = %A
%1:
ECHO
SD/P
ECHO
ECHO Strike a key when ready . . .
WAIT > NUL
BAT -BEGIN
CLS
BAT BEGTYPE
DIRECTORY CONTROL
(A)
Change Filename or Extension
(B)
Change File Attributes
(C)
Change Date or Time Stamp
(D)
Change Subdirectory Name
(E)
Change Volume Label
(F)
Display Directory
(G)
Display Directory Tree
(H)
Find File(s)
(I)
List File
(J)
Delete File(s)
(K)
Move File(s) Between Directories
(L)
Change Default Drive
(M)
Change Default Directory
(X)
Exit from Directory Control
END
BAT INKEY Command? %E
BAT IF %E = KEY01B GOTO -EXIT
BAT TYPE %E
BAT IF %E < A GOTO -BEGIN
BAT IF %E = X GOTO -EXIT
BAT IF %E = E GOTO -VOLABEL
BAT IF %E = G GOTO -TREE
BAT IF %E = H GOTO -WHERE
BAT IF %E = L GOTO -DRIVE
BAT IF %E = F SKIP 6
BAT IF %E = I SKIP 5
BAT IF %E = J SKIP 4
CD \
BAT IF %%E = K SKIP 2
BAT IF %E = M SKIP 1
BAT IF %E > E GOTO -BEGIN
ECHO
SD/P
BAT IF %%E = F GOTO -AGAIN
BAT IF %E = B GOTO -ATTREDI
BAT IF %E = I GOTO -LIST
BAT IF %E = J GOTO -DDEL
BAT IF %E = K GOTO -MOVE
BAT IF %E = M GOTO -CD
ECHO
BAT READ Which directory entry [
X
to exit]? %%1
BAT IF %1 = X GOTO -BEGIN
BAT IF %E = C GOTO -FDATE
BAT IF %E = D GOTO -RENDIR
ECHO
BAT READ New filename.ext? %%2
REN %1 %2
BAT GOTO -AGAIN
BAT -ATTREDI
ATTREDI
BAT GOTO -AGAIN
BAT -FDATE
ECHO
BAT READ New date [
mm/dd/yy
]? %%2
ECHO
BAT READ New time [
hh:mm:ss
or
CR
for no change]? %%3
BAT IF %3 = %S GOTO -FDATE2
FDATE %1 %2 %3
BAT GOTO -AGAIN
BAT -FDATE2
FDATE %1 %2
BAT GOTO -AGAIN
BAT -RENDIR
ECHO
BAT READ New directory name? %%2
RENDIR %1 %2
BAT GOTO -AGAIN
BAT -VOLABEL
CD \
BAT %%1 = %%V:
VOL
ECHO
BAT READ New volume name? %%2
BAT %1 = %1%2
VOLABEL %1
BAT GOTO -AGAIN
BAT -TREE
TREE
BAT GOTO -AGAIN
BAT -WHERE
ECHO
BAT READ File to locate
X
to exit]? %%1
BAT IF %1 = X GOTO -BEGIN
WHEREIS %1
BAT GOTO -AGAIN
BAT -LIST
ECHO
BAT READ File to list [
X
to exit]? %%1
BAT IF %1 = X GOTO -BEGIN
L5 %1
BAT GOTO -AGAIN
BAT -DDEL
ECHO
BAT READ Delete which file(s) [
X
to exit]? %%1
BAT IF %1 = X GOTO -BEGIN
DDEL %1
ECHO
BAT INKEY Delete another file [
Y/N
]? %%A
BAT TYPE %A
BAT IF %A = Y GOTO -DDEL
BAT GOTO -AGAIN
BAT -MOVE
ECHO
BAT READ Move file from which directory [
CR
for root]? %%1
BAT IF %1 = X GOTO -BEGIN
BAT IF %1 = %S %1 = \
CD %1
BAT IF %%1 = \ %%1 = %%S
ECHO
SD/P
ECHO
BAT READ Move which file? %%2
ECHO
BAT READ Move file to which directory [
CR
for root]? %%3
BAT IF %1 <> %3 SKIP 5
ECHO
BAT BEGTYPE
Cannot move within same directory!
END
BAT GOTO -MOVE
BAT IF %3 = \ %3 =
ECHO
CD \
MOVE %1\%2 %3\%2
BAT GOTO -AGAIN
BAT -CD
ECHO
BAT READ New default directory? %%2
CD %2
ECHO
SD/P
BAT -AGAIN
ECHO
BAT INKEY Another command [
Y/N
]? %%A
BAT TYPE %A
BAT IF %A = Y GOTO -BEGIN
BAT -EXIT
CD \
BAT %%1 = %%C:
%1
ECHO
BAT IF %%N = UTILITIES GOTO -MENU
PROKEY DOS.PRO/R
TYPE PK.DOS
BAT EXIT
BAT -MENU
C:MENU